From: Matthew Leeds Date: Thu, 24 May 2018 07:08:57 +0000 (-0700) Subject: bash-completion: Don't add a space after files and directories X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~23^2~35 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0d53e5d30940c567ddfa8a7655cc69deaf22df18;p=ostree.git bash-completion: Don't add a space after files and directories Currently if ostree is completing a file or directory for you it adds a space to the end, but this is an inconvenience when it's an intermediate directory in a tree. It's better to let the user add the space after the final directory, so this commit changes the bash completion to avoid adding a space when completing files or directories. Closes: #1598 Approved by: jlebon --- diff --git a/bash/ostree b/bash/ostree index 218e4254..46baa51b 100644 --- a/bash/ostree +++ b/bash/ostree @@ -87,10 +87,12 @@ __ostree_compreply_all_options() { } __ostree_compreply_all_files() { + compopt -o nospace COMPREPLY+=( $( compgen -f "$cur" ) ) } __ostree_compreply_dirs_only() { + compopt -o nospace COMPREPLY+=( $( compgen -d "$cur" ) ) }